package com.example.springboot.mapper;

import com.example.springboot.entity.Patient;
import com.example.springboot.entity.Rydk;
import com.example.springboot.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RydkMapper {
    @Insert("Insert into checkout (baseId, name,currentPosition,bodyTemperature,healthState,isToHighArea,isTouch,remarks,checkOutDate) VALUES (#{baseId},#{name},#{currentPosition},#{bodyTemperature},#{healthState},#{isToHighArea},#{isTouch},#{remarks},#{checkOutDate})")
    int insert(Rydk rydk);
    @Select("select * from checkout where name like concat('%' ,#{name},'%')  limit #{pageNum},#{pageSize}")
    List<Rydk> selectPage(Integer pageNum, Integer pageSize, String name);
    @Select("select count(*) from checkout where name like concat('%' ,#{name},'%')")
    Integer selectTotal(String name);
}
